/**
 * @Author: yzy
 * @Description:
 * @Version: 1.0.0
 * @Date: 2021/11/3 16:17
 * @Copyright: MIN-Group；国家重大科技基础设施——未来网络北大实验室；深圳市信息论与未来网络重点实验室
 */
package network

import "sync"

type Pool struct {
	Q        chan interface{}
	ConnPool sync.Pool
}

func NewPool(f func() interface{}, size int) Pool {
	return Pool{
		Q: make(chan interface{}, size),
		ConnPool: sync.Pool{
			New: f,
		},
	}
}
